import Vue from 'vue'
import Vuex from 'vuex'
import modules from './modules'
import persistedState from 'vuex-persistedstate'

Vue.use(Vuex)
const store = new Vuex.Store({
    modules,
    plugins: [
        persistedState({
            key: 'vueYxgkXm',
            paths: ['account.user', 'account.menuData']
        }),
        persistedState({
            key: 'vueYxgkXm',
            storage: window.sessionStorage,
            paths: ['actions.sjtbInfo']
        })
    ]
})

export default store
